;子程序名：PRINTOUT
;功能：将商品信息从显示器输出
;所用寄存器：无
;入口参数： DI--商品的首址
;出口参数： AX--待转换数
;调用子程序名：F2Y10

NAME PRINTOUT
EXTRN  F2T10: FAR
EXTRN  ACTUAL:  BYTE
EXTRN  CRLF:  BYTE
PUBLIC  PRINTOUT

.386
DATA  SEGMENT  USE16  PUBLIC  'DATA'
           TIP1  DB  'GOOD NAME:$',  0
           TIP2  DB  'DISCOUNT:$',  0
           TIP3  DB  'SELL  PRICE:$',  0
           TIP4  DB  'TOTAL  NUMBER:$',  0
           TIP5  DB  'SELL  NUMBER:$',  0
           TIP6  DB  'RECOMMENDED  DEGREE:$',  0
DATA  ENDS

STACK  SEGMENT  USE16  STACK  'STACK'
             DB  200  DUP(0)
STACK  ENDS

CODE  SEGMENT  USE16  PUBLIC  'CODE'
            ASSUME  CS:  CODE,  DS:  DATA,  SS:  STACK

PRINTOUT  PROC
            LEA  DX,  TIP1
            MOV  AH,  9
            INT  21H
            LEA  DX,  OFFSET  ACTUAL+2
            MOV  AH,  9
            INT  21H
            LEA  DX,  CRLF
            MOV  AH,  9
            INT  21H

            LEA  DX,  TIP2
            MOV  AH,  9
            INT  21H
            MOV  AL,  BYTE  PTR[DI+10]
            CBW
            CALL  F2T10
            LEA  DX,  CRLF
            MOV  AH,  9
            INT  21H

            LEA  DX,  TIP3               
            MOV  AH,  9
            INT  21H
            MOV  AX,  [DI+13]
            CALL  F2T10
            LEA  DX,  CRLF
            MOV  AH,  9
            INT  21H

            
            LEA  DX,  TIP4               
            MOV  AH,  9
            INT  21H
            MOV  AX,  [DI+15]
            CALL  F2T10
            LEA  DX,  CRLF
            MOV  AH,  9
            INT  21H

            LEA  DX,  TIP5            
            MOV  AH,  9
            INT  21H
            MOV  AX,  [DI+17]
            CALL  F2T10
            LEA  DX,  CRLF
            MOV  AH,  9
            INT  21H

            LEA  DX,  TIP6
            MOV  AH,  9
            INT  21H
            MOV  AX,  [DI+19]
            CALL  F2T10
            LEA  DX,  CRLF
            MOV  AH,  9
            INT  21H

            RET
PRINTOUT  ENDP

CODE  ENDS
            END